package com.todo.strategy.online.infrastructure.mapper;

import com.todo.strategy.online.infrastructure.entity.po.PlatformStrategyPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (PlatformStrategy)表数据库访问层
 *
 * @author zhangwenxiang
 * @since 2024-03-04 00:19:47
 */
public interface PlatformStrategyMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    PlatformStrategyPO queryPlatformStrategyPOById(Long id);

    /**
     * 新增数据
     *
     * @param platformStrategy 实例对象
     * @return 影响行数
     */
    int insertPlatformStrategyPO(PlatformStrategyPO platformStrategy);

    /**
     * 批量新增数据
     *
     * @param entities List<PlatformStrategy> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<PlatformStrategyPO> entities);

    /**
     * 修改数据
     *
     * @param platformStrategy 实例对象
     * @return 影响行数
     */
    int updatePlatformStrategyPOById(PlatformStrategyPO platformStrategy);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int removePlatformStrategyPOById(Long id);

    List<PlatformStrategyPO> queryPlatformStrategyByIdList(@Param("strategyIdList") List<Long> strategyIdList);

    Boolean updatePlatformStrategyStatus(@Param("strategyId") Long strategyId, @Param("status") Integer status);
}

